<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'adddis.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<style type="text/css">
		#contrainer{
			width: 500px;
			height: 600px;
			margin: 0 auto;
		}
		.red{
			color: #F00;
		}
		.greed{
			color: #0F0;
		}
	</style>
	<script src="date/jquery.js"></script>
	<script type="text/javascript">
		function checkname(){
			var name = $("#name").val();
			if(name.length==0){
				$("#namee").html("必须填写");
				$("#namee").removeClass("greed");
				$("#namee").addClass("red");
				return false;
			}else{
				$("#namee").html("正确");
				$("#namee").removeClass("red");
				$("#namee").addClass("greed");
				return true;
			}
		}
		$(function(){
			$("#name").blur(checkname);
			$("#form1").submit(function(){
				var flag = true;
				if(checkname() == false) flag = false;
				return flag;
			});
		})
	</script>
  </head>
  
  <body>
  <div id="contrainer">
	  <table>
	  	<tr>
	  		<td>
	  			<h1>新增地区</h1>
	  		</td>
	  	</tr>
	    <form id="form1" action="aqi/aqiAction!modifyDis" method="post">
	    	<tr>
	    		<td>
	    			地区名:
	    		</td>
	    		<td>
	    			<input id="name" name="dis.name" value="${dis.name}"><span id="namee"></span>
	    		</td>
	    	</tr>
	    	<input type="hidden" name="dis.id" value="${dis.id}">
	    	<tr>
	    		<td>
	    			<input type="submit" value="提交" />
	    		</td>
	    		<td>
	    			<input type="button" value="返回" onclick="javascript:location.href='aqi/aqiAction!disShow?page.nowpage=${page.nowpage}&likenme=${likename}'" />
	    		</td>
	    	</tr>
	    </form>
	  </table>
  </div>
  </body>
</html>
